package com.example.design.patterns.冰河.结构型模式.适配器模式.adapter;

import com.example.design.patterns.冰河.结构型模式.适配器模式.adaptee.Adaptee;
import com.example.design.patterns.冰河.结构型模式.适配器模式.target.Target;

/**
 * 对于Adaptee的接口与Taeget的接口进行适配
 */
public class Adapter implements Target {
    private Adaptee adaptee;

    public Adapter(Adaptee adaptee) {
        this.adaptee = adaptee;
    }

    @Override
    public void adapteeMethod() {
        adaptee.adapteeMethod();
    }

    @Override
    public void adapterMethod() {
        System.out.println("Adapter method");
    }
}
